//
// CLightingManager.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;

public class CLightingManager {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CLightingManager(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CLightingManager obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CLightingManager(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CLightingManager(boolean bSmallScene) {
    this(nel3dJNI.new_CLightingManager(bSmallScene), true);
  }

  public void setMaxLightContribution(long nlights) {
    nel3dJNI.CLightingManager_setMaxLightContribution(swigCPtr, this, nlights);
  }

  public long getMaxLightContribution() {
    return nel3dJNI.CLightingManager_getMaxLightContribution(swigCPtr, this);
  }

  public void setNoAttLightRadius(float noAttLightRadius) {
    nel3dJNI.CLightingManager_setNoAttLightRadius(swigCPtr, this, noAttLightRadius);
  }

  public float getNoAttLightRadius() {
    return nel3dJNI.CLightingManager_getNoAttLightRadius(swigCPtr, this);
  }

  public void setOutOfAttLightInfFactor(float outOfAttLightInfFactor) {
    nel3dJNI.CLightingManager_setOutOfAttLightInfFactor(swigCPtr, this, outOfAttLightInfFactor);
  }

  public float getOutOfAttLightInfFactor() {
    return nel3dJNI.CLightingManager_getOutOfAttLightInfFactor(swigCPtr, this);
  }

  public void setLightTransitionThreshold(float lightTransitionThreshold) {
    nel3dJNI.CLightingManager_setLightTransitionThreshold(swigCPtr, this, lightTransitionThreshold);
  }

  public float getLightTransitionThreshold() {
    return nel3dJNI.CLightingManager_getLightTransitionThreshold(swigCPtr, this);
  }

  public void clearDynamicLights() {
    nel3dJNI.CLightingManager_clearDynamicLights(swigCPtr, this);
  }

  public void addDynamicLight(CPointLight light) {
    nel3dJNI.CLightingManager_addDynamicLight(swigCPtr, this, CPointLight.getCPtr(light), light);
  }

  public SWIGTYPE_p_std__vectorT_NL3D__CPointLight_p_t getAllDynamicLightList() {
    return new SWIGTYPE_p_std__vectorT_NL3D__CPointLight_p_t(nel3dJNI.CLightingManager_getAllDynamicLightList(swigCPtr, this), false);
  }

  public SWIGTYPE_p_NL3D__CLightingManager__CQGItLightedModel eraseStaticLightedModel(SWIGTYPE_p_NL3D__CLightingManager__CQGItLightedModel ite) {
    return new SWIGTYPE_p_NL3D__CLightingManager__CQGItLightedModel(nel3dJNI.CLightingManager_eraseStaticLightedModel(swigCPtr, this, SWIGTYPE_p_NL3D__CLightingManager__CQGItLightedModel.getCPtr(ite)), true);
  }

  public SWIGTYPE_p_NL3D__CLightingManager__CQGItLightedModel insertStaticLightedModel(CTransform model) {
    return new SWIGTYPE_p_NL3D__CLightingManager__CQGItLightedModel(nel3dJNI.CLightingManager_insertStaticLightedModel(swigCPtr, this, CTransform.getCPtr(model), model), true);
  }

  public void computeModelLightContributions(CRGBA sunAmbient, CTransform model, CLightContribution lightContrib, ILogicInfo logicInfo) {
    nel3dJNI.CLightingManager_computeModelLightContributions__SWIG_0(swigCPtr, this, CRGBA.getCPtr(sunAmbient), sunAmbient, CTransform.getCPtr(model), model, CLightContribution.getCPtr(lightContrib), lightContrib, ILogicInfo.getCPtr(logicInfo), logicInfo);
  }

  public void computeModelLightContributions(CRGBA sunAmbient, CTransform model, CLightContribution lightContrib) {
    nel3dJNI.CLightingManager_computeModelLightContributions__SWIG_1(swigCPtr, this, CRGBA.getCPtr(sunAmbient), sunAmbient, CTransform.getCPtr(model), model, CLightContribution.getCPtr(lightContrib), lightContrib);
  }

}
